

package com.hazelcast.flakeidgen.impl;

import com.hazelcast.flakeidgen.FlakeIdGenerator;
import com.hazelcast.internal.metrics.DynamicMetricsProvider;
import com.hazelcast.internal.monitor.LocalFlakeIdGeneratorStats;
import com.hazelcast.internal.services.ManagedService;
import com.hazelcast.internal.services.RemoteService;
import com.hazelcast.internal.services.StatisticsAwareService;

public interface FlakeIdGeneratorService extends ManagedService, RemoteService, StatisticsAwareService<LocalFlakeIdGeneratorStats>, DynamicMetricsProvider {
    String SERVICE_NAME = "hz:impl:flakeIdGeneratorService";

    /**
     * Updated the statistics for the {@link FlakeIdGenerator} with the given
     * name for a newly generated batch of the given size.
     *
     * @param name      name of the generator, not null
     * @param batchSize size of the batch created
     */
    void updateStatsForBatch(String name, int batchSize);
}
